package com.shenganyuan.smac.contact.model;

import com.oklib.utils.network.http.ViseHttp;
import com.shenganyuan.smac.App;
import com.shenganyuan.smac.common.data.Api;
import com.shenganyuan.smac.contact.contract.ContactContract;

import io.reactivex.Observable;

/**
 * Created by Damon.Han on 2018/3/30 0030.
 *
 * @author Damon
 */
public class ContactModel implements ContactContract.Model {

    @Override
    public Observable<ApiMainContact> getContacts() {
        String id = App.getCurrentUser().getId();
        Observable<ApiMainContact> observable = ViseHttp.RETROFIT().create(Api.class).mainContacts(id, App.getAccessToken());
        return observable;
    }
}
